<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>RabbitMQ高并发秒杀</title>
  <script src="/js/jquery.min.js"></script>
  <script src="/js/jquery.countdown.min.js"></script>
  <script src="/js/sec.js"></script>
  <script th:inline="javascript">
    $(function () {
      let goodsId = document.getElementById("goodsId").value
      let nowTime = document.getElementById("nowTime").value
      let startTime = document.getElementById("startTime").value
      let endTime = document.getElementById("endTime").value
      console.log(startTime)
      seckill.func.init(goodsId, nowTime, startTime, endTime)
    })
  </script>
</head>
<body th:inline="text">
<input type="hidden" id="goodsId" th:value="${goods.id}">
<input type="hidden" id="nowTime" th:value="${nowTime}">
<input type="hidden" id="startTime" th:value="${goods.startTime.time}">
<input type="hidden" id="endTime" th:value="${goods.endTime.time}">
<div th:style="'margin:auto; background-color: whitesmoke; width: 1202px; height: 45px; line-height: 45px;'">
  <div style="margin:auto; float:left; width:1000px;">
    主题频道
    生活助手
    会员服务
    更多热点
    商家入驻
  </div>
  <div style="margin:auto; float:left; width:200px;">
    请登录
    请注册
    商家入驻
  </div>
</div>
<div id="content" style="margin:auto; width:1202px;">
  <div style="margin: 10px; height: 75px; line-height: 75px;">
    <div style="float: left; line-height: 50px;"><img th:src="@{/image/logo.png}" alt="网站Logo"></div>
    <div style="float: left; width: 170px;">&nbsp;</div>
    <div style="float: left;line-height: 50px;"><label>
      <input type="text" style="width: 430px; height: 40px;">
      &nbsp;&nbsp;搜索
    </label>
    </div>
  </div>
</div>
<div style="margin:0 auto; width:1202px;">
  <div style="float: left;margin: 18px;">
    <img th:src="${goods.imageUrl}" alt="商品图片">
  </div>
  <div style="float: left;margin: 18px;">
    <p>
      [[${goods.name}]] [[${goods.nameDesc}]]
    </p>
    <p>
      <span style="color: red;font-size:20px;font-weight: bold;">[[${goods.price}]]</span>
    </p>
    <p>
      剩余：剩余件数 [[${goods.store}]] 件
    </p>
    <br/>
    <p id="seckillTip">
    </p>
  </div>
</div>
</body>
</html>